<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<!--单个复选框返回的是bool类型，多选框返回的是数组-->
<div id="app">
  <!--没有label只能点小按钮，有label可以点文字也能实现勾选-->
  <label for="contact">
    <input type="checkbox" id="contact" v-model="contact">同意协议
  </label>
  <h3>{{contact}}</h3>
  <button :disabled="!contact">下一步</button>
</div>
<div id="app1">
<!--  <input type="checkbox" value="篮球" v-model="hobbyies">篮球-->
<!--  <input type="checkbox" value="足球" v-model="hobbyies">足球-->
<!--  <h2>{{hobbyies}}</h2>-->
  <label v-for="item in originHobbies">
    <input type="checkbox" :value="item" v-model="hobbyies">{{item}}
  </label>
</div>
<script src="../js/vue.js"></script>
<script>
  const app = new Vue({
    el: '#app',
    data: {
      contact: "",
    }
  })
  const app1 = new Vue({
    el: '#app1',
    data: {
      hobbyies: [],
      originHobbies: ["篮球","足球"]
    }
  })
</script>
</body>
</html>
